home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
network
/
easynet
/
demo.bas
< prev
next >
Wrap
BASIC Source File
|
1995-12-26
|
4KB
|
136 lines
Attribute VB_Name = "DEMO1"
Global Const CASCADE = 0
Global Const MOZAIQUE_HORIZONTALE = 1
Global Const MOZAIQUE_VERTICALE = 2
Global Const REORGANISER_ICONES = 3
Global Const KEY_DELETE = &H2E
Global Const KEY_PRIOR = &H21
Global Const KEY_NEXT = &H22
Global Const KEY_END = &H23
Global Const KEY_HOME = &H24
Global Const KEY_LEFT = &H25
Global Const KEY_UP = &H26
Global Const KEY_RIGHT = &H27
Global Const KEY_DOWN = &H28
Global Const WM_COMMAND = &H111
Global Const WM_HSCROLL = &H114
Global Const WM_VSCROLL = &H115
Global Const SB_LINEUP = 0
Global Const SB_LINEDOWN = 1
Global Const SB_PAGEUP = 2
Global Const SB_PAGEDOWN = 3
Global Const SB_TOP = 6
Global Const SB_BOTTOM = 7
Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
' Commands to pass WinHelp()
Global Const HELP_CONTEXT = &H1 ' Display topic in ulTopic
Global Const HELP_QUIT = &H2 ' Terminate help
Global Const HELP_INDEX = &H3 ' Display index
Global Const HELP_HELPONHELP = &H4 ' Display help on using help
Global Const HELP_SETINDEX = &H5 ' Set the current Index for multi index help
Global Const HELP_KEY = &H101 ' Display topic for keyword in offabData
Global Const HELP_MULTIKEY = &H201
Declare Function WinHelp Lib "User" (ByVal hWnd As Integer, ByVal lpHelpFile As String, ByVal wCommand As Integer, dwData As Any) As Integer
Global Actor$, Role$, Legend$, cr$, lf$
Global Picnum%, AutoSize%, Ok%, AlignMent%
Sub ActivateForm()
CheckZoomMenu
MDI1.Command5.Enabled = True
MDI1.Command5.Caption = "Comments " + MDI1.ActiveForm.Caption
Dim Net1 As Control
Set Net1 = MDI1.ActiveForm.Net1
MDI1.ReadOnlyMenu.Checked = Net1.ReadOnly
MDI1.MultiSelectionMenu.Checked = Net1.MultiSel
MDI1.CanSizeNodeMenu.Checked = Net1.CanSizeNode
MDI1.CanMoveNodemenu.Checked = Net1.CanMoveNode
MDI1.CanStretchLinkMenu.Checked = Net1.CanStretchLink
MDI1.CanMultiLinkMenu.Checked = Net1.CanMultiLink
MDI1.CanDrawNodeMenu.Checked = Net1.CanDrawNode
MDI1.CanDrawLinkMenu.Checked = Net1.CanDrawLink
MDI1.AutoScrollMenu.Checked = Net1.AutoScroll
End Sub
Sub CheckZoomMenu()
Dim Zoom%, i%
Zoom = MDI1.ActiveForm.Net1.Zoom
Select Case Zoom
Case 100
i = 0
Case 200
i = 1
Case 50
i = 2
Case 0
i = 3
End Select
MDI1.ZoomValueMenu(i).Checked = True
End Sub
Sub CursorShape(Net1 As Control)
Dim area%
area = Net1.PointedArea
Select Case area
Case 0
Net1.MousePointer = 8
Case 1
Net1.MousePointer = 7
Case 2
Net1.MousePointer = 6
Case 3
Net1.MousePointer = 9
Case 7
If Net1.SelectMode = True Then
Net1.MousePointer = 2
Else
Net1.MousePointer = 0
End If
End Select
End Sub
Sub DeactivateForm()
Dim i%
For i = 0 To 3
MDI1.ZoomValueMenu(i).Checked = False
Next
MDI1.ReadOnlyMenu.Checked = False
MDI1.MultiSelectionMenu.Checked = False
MDI1.CanSizeNodeMenu.Checked = False
MDI1.CanMoveNodemenu.Checked = False
MDI1.CanStretchLinkMenu.Checked = False
MDI1.CanMultiLinkMenu.Checked = False
MDI1.CanDrawNodeMenu.Checked = False
MDI1.CanDrawLinkMenu.Checked = False
MDI1.AutoScrollMenu.Checked = False
End Sub
Sub SpeedOFF(Net1 As Control)
Net1.Repaint = True
Net1.DoChange = True
Net1.DoSelChange = True
Net1.CheckItem = True
End Sub
Sub SpeedON(Net1 As Control)
Net1.Repaint = False
Net1.DoChange = False
Net1.DoSelChange = False
Net1.CheckItem = False
End Sub